package com.nyc.boot;

import java.util.Iterator;
import java.util.ServiceLoader;

/**
 * @author 26917
 * SPI
 */
public class StartAppSPI {
    public static void main(String[] args) {
        ServiceLoader<Connection> load = ServiceLoader.load(Connection.class);
        Iterator<Connection> iterator = load.iterator();
        while(iterator.hasNext()){
            Connection next = iterator.next();
            next.getUrl();
        }
    }
}